jq(document).ready(function(){


	jq('ul.sf-menu').superfish();


	//搜索
	jq("#scbar_btn").click(function(){
		var query = encodeURI(jq("#scbar_txt").val());
		if (query != "" && query != "%E8%AF%B7%E8%BE%93%E5%85%A5%E6%90%9C%E7%B4%A2%E5%86%85%E5%AE%B9"){
			window.open('http://s.arpggame.com/search?hl=zh-CN&q=site:wow.arpggame.com%20'+query+'&start=0', "_blank");	
		}else{
			alert('请输入搜索内容！');
		}
		return false;
	});


	//数据库搜索
	jq("#db_search").click(function(){
		var query = encodeURI(jq("#db_txt").val());
		var select = jq("#db_s").val();
		if (query != "" && query != "%E8%AF%B7%E8%BE%93%E5%85%A5%E6%90%9C%E7%B4%A2%E5%86%85%E5%AE%B9"){
			window.open('http://db.arpggame.com/wow/search?mod='+select+'&q='+query, "_blank");	
		}else{
			alert('请输入搜索内容！');
		}
		return false;
	});
});
